package com.xzq.erp.enums;

import com.xzq.erp.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应码枚举
 */
@Getter
@AllArgsConstructor
public enum ResponseCodeEnum implements BaseExceptionInterface {

    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("10000", "出错啦，后台小哥正在努力修复中..."),
    PARAM_NOT_VALID("10001", "参数错误"),
    // ----------- 业务异常状态码 -----------
    CUSTOMER_NOT_EXIST("20001", "客户不存在"),
    CHANNEL_NOT_EXIST("20002", "渠道不存在" ),
    FORBIDDEN("20003", "无权限访问"),
    UNAUTHORIZED("20004", "未授权"),
    LOGIN_ERROR("20005","用户名或密码错误" ),
    USERNAME_ALREADY_EXISTS("20006","用户名已存在"),
    MENU_TYPE_NOT_EXIST("20007","菜单类型不存在"),
    REFRESH_TOKEN_ERROR("20008","刷新的令牌无效" ),
    FILE_UPLOAD_ERROR("20009","文件上传失败"),
    FILE_SIZE_EXCEED("20010","文件超出大小"),
    FILE_DELETE_ERROR("20011","文件删除失败"),
    PRODUCT_CATEGORY_NOT_EMPTY("20012","商品分类下有商品，请先删除商品"),
    CHAT_HISTORY_EXCEED("20013","会话数量已达上限"),
    USER_PASSWORD_ERROR("20014","密码错误"),
    USERNAME_NOT_EXISTS("20015", "用户不存在"),
    PASSWORD_ERROR("20016","用户名或密码错误"),
    ;

    // 异常码
    private String errorCode;
    // 错误信息
    private String errorMessage;
}
